* {
    padding: 0px;
    margin: 0px;
}

/* 设置基础布局结构 */
body {
    height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
}

:root {
    --header-height: 80px;
    --nav-height: 80px;
    --h3-spacing: 1.8em;
    --h4-spacing: 1.2em;
    --h3-font: 18px;
    --h4-font: 15px;
}

/* 初始隐藏状态 */
#app {
    flex: 1;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* 加载完成状态 */
#app.loaded {
    opacity: 1;
}

/* 延迟动画元素 */
.module-header,
.function-nav,
.content-area {
    opacity: 0;
    transform: translateY(-20px);
}

/* 具体实现方案 */
.module-header {
    height: 80px;
    /* 明确header高度 */
}

.function-nav {
    height: 60px;
    /* 明确nav高度 */
    flex-shrink: 0;
}

.content-area {
    height: calc(95vh - var(--header-height) - var(--nav-height));
}

.stats-container {
    display: flex;
    flex-wrap: wrap;
    /* 允许换行 */
    gap: 15px;
    /* 替代margin间距 */
    justify-content: flex-start;
}

.stat-item {
    display: flex;
    align-items: center;
    padding: 5px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    flex: 1 1 auto;
    /* 改为自动伸缩 */
    max-width: 280px;
    margin: 0 10px;
    /* 最大宽度 */
}

.stat-icon {
    flex-shrink: 0;
    margin-right: 15px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.stat-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* 垂直居中 */
}

.stat-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 4px;
    /* 增加间距 */
    line-height: 1.3;
}

.stat-value {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    line-height: 1.2;
}

/* 修改关键帧动画 */
@keyframes fadeInDown {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes contentBounce {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    70% {
        opacity: 1;
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0);
    }
}

/* 应用不同动画 */
#app.loaded .module-header {
    animation: fadeInDown 0.6s ease-out forwards;
    animation-delay: 0.3s;
}

#app.loaded .function-nav {
    animation: fadeInDown 0.6s ease-out forwards;
    animation-delay: 0.5s;
}

#app.loaded .content-area {
    animation: contentBounce 1s cubic-bezier(0.2, 0.6, 0.3, 1.2) forwards;
    animation-delay: 0.7s;
    opacity: 1;
}

/* 基础样式 */
.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: #2c3e50;
    color: white;
}

.module-header h1 {
    font-size: 1.8rem;
    margin: 0;
    text-align: left;
    font-size: 40px;
}

.info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    size: 24px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.user-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #3498db;
}

.username {
    color: #ecf0f1;
}

.date-info {
    color: #bdc3c7;
}

.function-nav {
    display: flex;
    gap: 1rem;
    padding: 1rem 5%;
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
    max-width: 600pdx;
}

.function-nav button {
    padding: 0.8rem 4rem;
    border: none;
    border-radius: 5px;
    background: #e9ecef;
    cursor: pointer;
    transition: all 0.3s;
}

.function-nav button.active {
    background: #3498db;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.content-area {
    flex: 1;
    min-height: 0;
    /* 修复flex容器溢出问题 */
    height: calc(100vh - header_height - nav_height);
    padding: 2rem 2.5%;
    flex: 1;
    /* 允许垂直滚动 */
    padding: 20px;
}

/* 统一模块容器样式 */
.function-section,
.api-docs,
.history-section {
    display: flex;
    flex-direction: column;
    width: 91%;
    margin: 0 auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    padding-top: 1rem;
    min-height: min-content;
    overflow: visible;
    /* 根据实际布局调整 */
    overflow-y: auto;
}

/* 功能展示区 */
.demo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    width: 100%;
}

.input-area {
    width: auto;
    max-width: 1000px;
    height: 450px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    position: relative;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.result-preview {
    width: auto;
    height: auto;
    min-height: 1000px;
    min-height: 300px;
    margin-top: 20px;
}

.result-preview img {
    max-width: 100%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* API文档样式 */
.api-docs table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

.api-docs td,
.api-docs th {
    border: 1px solid #ddd;
    padding: 0.8rem;
}

.api-docs pre {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
}

/* 历史记录 */
.history-list {
    margin-top: 2rem;
}

.record-item {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    /* 等分四列 */
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1.5rem;
    border-bottom: 1px solid #eee;
    padding-left: 0px;
}

.time,
.caller,
.status {
    padding: 0.4rem 0.6rem;
    /* 统一内边距 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.status {
    padding: 0.4rem 0.8rem;
    /* 状态标签稍宽 */
    text-align: center;
}

.status.success {
    background: #e8f5e9;
    color: #2e7d32;
}

.status.processing {
    background: #fff3e0;
    color: #ef6c00;
}

.record-item button {
    padding: 0.5rem 1rem;
    width: max-content;
    /* 按钮自适应内容宽度 */
    justify-self: end;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.2s;
}

.record-item button:hover {
    background: #e0e0e0;
}

/* 移动端适配调整 */
@media (max-width: 1200px) {
    .input-area {
        width: 85%;
        height: 450px;
    }
}

@media (max-width: 768px) {
    .input-area {
        width: 92%;
        height: 350px;
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    .input-area {
        width: 96%;
        height: 250px;
    }
}

.stats-container {
    display: flex;
    justify-content: flex-end;
    /* 右对齐 */
    gap: 1rem;
    /* 卡片之间的间距 */
}

.stat-card {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-radius: 8px;
    color: #fff;
    flex: 0 0 auto;
    /* 不允许卡片缩放 */
}

.stat-card.blue {
    background-color: #00aaff;
    /* 蓝色 */
}

.stat-card.yellow {
    background-color: #ffcc00;
    /* 黄色 */
}

.stat-card.teal {
    background-color: #008080;
    /* 青色 */
}

.stat-card.red {
    background-color: #ff4d4d;
    /* 红色 */
}

.stat-info {
    margin-left: 0.5rem;
    /* 图标与文本之间的间距 */
}

.stat-title {
    font-size: 1rem;
    font-weight: bold;
}

.stat-value {
    font-size: 0.9rem;
}

/* 轮播图容器 */
.carousel-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    border-radius: 8px;
}

/* 轮播轨道 */
.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    /* 优化动画性能 */
}

/* 单个轮播项 */
.carousel-item {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* 移除图片底部间隙 */
}

/* 新增包裹容器 */
.carousel-wrapper {
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    position: relative;
}

/* 修复导航点显示问题 */
.carousel-dots {
    display: flex !important;
    /* 强制显示 */
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    /* 确保在轮播图上方 */
    gap: 10px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.3);
    /* 添加背景 */
    border-radius: 20px;
}

.carousel-dots span {
    display: block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dots span.active {
    background: #fff;
    transform: scale(1.2);
}

/* 隐藏横向滚动 */
.content-area {
    overflow-x: hidden;
}

/* 自定义滚动条样式 */
.content-area::-webkit-scrollbar {
    width: 6px;
}

.content-area::-webkit-scrollbar-thumb {
    background: #c0c4cc;
    border-radius: 3px;
}

.content-area::-webkit-scrollbar-track {
    background: #f5f7fa;
}

/* 调整内部容器高度 */
.demo-container {
    height: auto;
    min-height: 100%;
    padding-bottom: 30px;
    /* 留出底部间距 */
}

/* 自定义滚动条样式 */
.function-section::-webkit-scrollbar {
    width: 6px;
}

.function-section::-webkit-scrollbar-thumb {
    background: #c0c4cc;
    border-radius: 3px;
}

.function-section::-webkit-scrollbar-track {
    background: #f5f7fa;
}


.result-preview {
    min-height: 300px;
    margin-top: 20px;
}

.carousel-arrow {
    /* 基础样式 */
    scale: 3;
    position: absolute;
    top: 60%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    opacity: 0.6;
    /* 默认半透明 */

    /* 箭头图标 */
    &::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 24px;
        height: 24px;
        background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23FFFFFF'%3E%3Cpath d='M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z'/%3E%3C/svg%3E");
        transform: translate(-50%, -50%);
        transition: opacity 0.3s;
    }

    /* 悬停状态 */
    &:hover {
        opacity: 1;

        /* 完全不透明 */
        &::after {
            filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
        }
    }

    /* 右侧箭头 */
    &.right {
        right: 24px;

        &::after {
            transform: translate(-50%, -50%) scaleX(-1);
        }
    }

    /* 左侧箭头 */
    &.left {
        left: 24px;
    }
}

/* 调整按钮定位 */
.process-btn {
    transform: scale(1);
    position: absolute;
    top: 20px;
    right: 40px;
    z-index: 30;
    /* 确保在轮播内容之上 */
    padding: 8px 20px;
    font-size: 14px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
    /* 毛玻璃效果 */
    background: rgba(255, 255, 255, 0.9);
    color: #409EFF;
    border: 1px solid rgba(64, 158, 255, 0.3);
}

/* 修改为放大动画 */
@keyframes scale-up {
    0% {
        transform: scale(1.5);
    }

    100% {
        transform: scale(1.6);
    }
}

/* 添加反弹动画 */
@keyframes bounce {
    0% {
        transform: scale(1.5);
    }

    50% {
        transform: scale(1.6);
    }

    100% {
        transform: scale(1.5);
    }
}

.process-btn:hover:not(:disabled) {
    animation: scale-up ease-out forwards;
    /* 保持最终状态 */
    /* 总时长0.4s包含往返 */
    box-shadow: 0 4px 15px rgba(64, 158, 255, 0.3);
}

/* 添加移出时的过渡效果 */
.process-btn {
    transition: all 0.2s ease-in-out;
}

/* 调整原有hover状态 */
.process-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 1);
    /* 移除原来的transform */
}

/* 移动端适配 */
@media (max-width: 768px) {
    @keyframes mobile-bounce {
        0% {
            transform: scale(1.3);
        }

        50% {
            transform: scale(1.4);
        }

        100% {
            transform: scale(1.3);
        }
    }

    .process-btn:hover:not(:disabled) {
        animation: mobile-bounce 0.4s ease-in-out;
    }
}

.process-btn:disabled {
    background: rgba(200, 200, 200, 0.8);
    color: #666;
}

/* 移除原action-bar样式 */
.action-bar {
    display: none;
}

/* 结果展示优化 */
.result-preview {
    /* 保持原有样式 */
    min-height: 300px;
    padding: 20px;
}

.result-content {
    margin-top: 15px;
    white-space: pre-wrap;
}

.endpoint {
    /* 中英混合字体栈 */
    font-family:
        "Times New Roman",
        /* 英文首选字体 */
        "Microsoft YaHei",
        /* 中文首选字体 */
        Georgia,
        /* 英文备选衬线体 */
        "微软雅黑",
        /* 中文别名写法 */
        SimSun,
        /* 极端情况下的中文备选 */
        serif;
    /* 通用衬线字体族 */

    /* 增强字体渲染 */
    text-rendering: optimizeLegibility;
    /* 优化可读性 */
    -webkit-font-smoothing: antialiased;
    /* Mac字体平滑 */
    -moz-osx-font-smoothing: grayscale;
}

/* 代码块保持等宽字体 */
.endpoint pre,
.endpoint code {
    font-family:
        "Courier New",
        Monaco,
        Consolas,
        "等距更纱黑体 SC",
        monospace;
}

.endpoint {
    /* 建立新的层叠上下文 */
    isolation: isolate;
}

.endpoint h3 {
    font-size: var(--h3-font);
    margin: calc(var(--h3-spacing) * 1.5) 0 var(--h3-spacing);
    padding-bottom: 0.8em;
    position: relative;
    color: #2c3e50;
    border-bottom: 2px solid #f0f2f5;
}

/* h3之间的间距 */
.endpoint h3+h3 {
    margin-top: calc(var(--h3-spacing) * 2);
}

/* h3后接h4的间距 */
.endpoint h3+h4 {
    margin-top: calc(var(--h3-spacing) * 0.8);
}

.endpoint h4 {
    font-size: var(--h4-font);
    margin: var(--h4-spacing) 0 calc(var(--h4-spacing) * 0.8);
    color: #4a5568;
    font-weight: 500;
    position: relative;
}

/* h4之间的间距 */
.endpoint h4+h4 {
    margin-top: calc(var(--h4-spacing) * 0.6);
}

/* h4后接内容的间距 */
.endpoint h4+pre,
.endpoint h4+table,
.endpoint h4+p {
    margin-top: calc(var(--h4-spacing) * 0.5);
}

/* 历史记录标题容器 */
.history-section h2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding-right: 100px;
    /* 为按钮预留空间 */
}

/* 刷新按钮样式 */
.refresh-btn {
    position: absolute;
    right: 95px;
    top: 60px;
    transform: translateY(-50%);
    padding: 12px 35px;
    background: #409EFF;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 悬停效果 */
.refresh-btn:hover {
    background: #337ecc;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    transform: translateY(-50%) scale(1.05);
}

/* 加载状态 */
.refresh-btn:disabled {
    background: #a0cfff;
    cursor: not-allowed;
    opacity: 0.8;
}

/* 分页容器 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin: 30px 0;
    padding: 0;
}

/* 分页按钮通用样式 */
.page-btn,
.page-number {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: #606266;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
}

/* 箭头按钮样式 */
.page-btn {
    position: relative;
    background: #f5f5f7;
    transition: background 0.3s ease;
}

.page-btn::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    border: 2px solid currentColor;
    border-width: 2px 2px 0 0;
}

/* 左箭头 */
.page-btn:first-child::after {
    transform: rotate(-135deg);
    left: 13px;
}

/* 右箭头 */
.page-btn:last-child::after {
    transform: rotate(45deg);
    left: 11px;
}

/* 页码激活状态 */
.page-number.active {
    background: #409EFF;
    color: white;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(64, 158, 255, 0.3);
}

/* 悬停效果 */
.page-btn:hover:not(:disabled),
.page-number:hover:not(.active) {
    background: #ebedf0;
    transform: translateY(-1px);
}

.page-btn:hover:not(:disabled) {
    background: #e1e3e6;
}

/* 禁用状态 */
.page-btn:disabled {
    color: #c0c4cc;
    background: #f5f5f7;
    cursor: not-allowed;
}